package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.RejectionRecordMapper;
import com.ruoyi.purchase.domain.RejectionRecord;
import com.ruoyi.purchase.service.IRejectionRecordService;

/**
 * 不合格记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-31
 */
@Service
public class RejectionRecordServiceImpl implements IRejectionRecordService 
{
    @Autowired
    private RejectionRecordMapper rejectionRecordMapper;

    /**
     * 查询不合格记录
     * 
     * @param id 不合格记录主键
     * @return 不合格记录
     */
    @Override
    public RejectionRecord selectRejectionRecordById(Long id)
    {
        return rejectionRecordMapper.selectRejectionRecordById(id);
    }

    /**
     * 查询不合格记录列表
     * 
     * @param rejectionRecord 不合格记录
     * @return 不合格记录
     */
    @Override
    public List<RejectionRecord> selectRejectionRecordList(RejectionRecord rejectionRecord)
    {
        return rejectionRecordMapper.selectRejectionRecordList(rejectionRecord);
    }

    /**
     * 新增不合格记录
     * 
     * @param rejectionRecord 不合格记录
     * @return 结果
     */
    @Override
    public int insertRejectionRecord(RejectionRecord rejectionRecord)
    {
        return rejectionRecordMapper.insertRejectionRecord(rejectionRecord);
    }

    /**
     * 修改不合格记录
     * 
     * @param rejectionRecord 不合格记录
     * @return 结果
     */
    @Override
    public int updateRejectionRecord(RejectionRecord rejectionRecord)
    {
        return rejectionRecordMapper.updateRejectionRecord(rejectionRecord);
    }

    /**
     * 批量删除不合格记录
     * 
     * @param ids 需要删除的不合格记录主键
     * @return 结果
     */
    @Override
    public int deleteRejectionRecordByIds(Long[] ids)
    {
        return rejectionRecordMapper.deleteRejectionRecordByIds(ids);
    }

    /**
     * 删除不合格记录信息
     * 
     * @param id 不合格记录主键
     * @return 结果
     */
    @Override
    public int deleteRejectionRecordById(Long id)
    {
        return rejectionRecordMapper.deleteRejectionRecordById(id);
    }
}
